import request from '@/config/axios'
import type { Dayjs } from 'dayjs';

/** 医院合作申请单信息 */
export interface WelfareHospitalApply {
          id: number; // 主键ID
          hospitalName?: string; // 医院名称
          department?: string; // 科室
          contactPerson?: string; // 联系人
          mobile?: string; // 手机号码
          researchDirection: string; // 科研方向
  }

// 医院合作申请单 API
export const WelfareHospitalApplyApi = {
  // 查询医院合作申请单分页
  getWelfareHospitalApplyPage: async (params: any) => {
    return await request.get({ url: `/mcm/welfare-hospital-apply/page`, params })
  },

  // 查询医院合作申请单详情
  getWelfareHospitalApply: async (id: number) => {
    return await request.get({ url: `/mcm/welfare-hospital-apply/get?id=` + id })
  },

  // 新增医院合作申请单
  createWelfareHospitalApply: async (data: WelfareHospitalApply) => {
    return await request.post({ url: `/mcm/welfare-hospital-apply/create`, data })
  },

  // 修改医院合作申请单
  updateWelfareHospitalApply: async (data: WelfareHospitalApply) => {
    return await request.put({ url: `/mcm/welfare-hospital-apply/update`, data })
  },

  // 删除医院合作申请单
  deleteWelfareHospitalApply: async (id: number) => {
    return await request.delete({ url: `/mcm/welfare-hospital-apply/delete?id=` + id })
  },

  /** 批量删除医院合作申请单 */
  deleteWelfareHospitalApplyList: async (ids: number[]) => {
    return await request.delete({ url: `/mcm/welfare-hospital-apply/delete-list?ids=${ids.join(',')}` })
  },

  // 导出医院合作申请单 Excel
  exportWelfareHospitalApply: async (params) => {
    return await request.download({ url: `/mcm/welfare-hospital-apply/export-excel`, params })
  },
}